<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //语法一：
        function sum(a,b){
            return a+b
        }
        var result=sum(10,20)
        console.log(result)
        //语法二：
        var add=function(getSum){
            return getSum(10,20)
        }
        var result=add(sum)
        console.log(result)
    </script>
</head>
<body>
    
</body>
</html>